///PHILOTES Source Code.  (C)2012 PhiloLabs
#pragma once


#include "stdneb.h"
// Platform-specific stuff
#include "OgrePlatform.h"

// Needed for OGRE_WCHAR_T_STRINGS below
#include <string>


// configure memory tracking
#if OGRE_DEBUG_MODE 
#	if OGRE_MEMORY_TRACKER_DEBUG_MODE
#		define OGRE_MEMORY_TRACKER 1
#	else
#		define OGRE_MEMORY_TRACKER 0
#	endif
#else
#	if OGRE_MEMORY_TRACKER_RELEASE_MODE
#		define OGRE_MEMORY_TRACKER 1
#	else
#		define OGRE_MEMORY_TRACKER 0
#	endif
#endif


namespace Core{
	class LogManager;
	class Log;
}
using namespace Core;

namespace Util
{
	class ColourValue;
	class Bitwise;
}
using namespace Util;

namespace Timing{
	class PhiloTimer;
}

namespace Extras{
	class Billboard;
	class BillboardSet;
	class Font;
	class FontPtr;
	class FontManager;
	class Overlay;
	class OverlayContainer;
	class OverlayElement;
	class OverlayElementFactory;
	class OverlayManager;
	class ManualObject;
}
using namespace Extras;

#include "math/mathprerequisites.h"

namespace Ogre {
    // Define ogre version
    #define PHILO_VER_MAJOR 0
    #define PHILO_VER_MINOR 1
    #define PHILO_VER_PATCH 0
	#define PHILO_VER_SUFFIX "unstable"
    #define PHILO_VER_NAME "leisirenle"

    #define PHILO_VERSION    ((PHILO_VER_MAJOR << 16) | (PHILO_VER_MINOR << 8) | PHILO_VER_PATCH)

    // define the real number values to be used
    // default to use 'float' unless precompiler option set
    #if OGRE_DOUBLE_PRECISION == 1	
        typedef double Real;
    #else
        typedef float Real;
    #endif


    #   if OGRE_COMPILER == OGRE_COMPILER_MSVC
    #       if OGRE_COMP_VER >= 1600 // VC++ 10.0
	#			define HashMap ::std::tr1::unordered_map
	#           define HashSet ::std::tr1::unordered_set
	#		 elif OGRE_COMP_VER > 1300 && !defined(_STLP_MSVC)
    #           define HashMap ::stdext::hash_map
	#           define HashSet ::stdext::hash_set
    #       else
    #           define HashMap ::std::hash_map
	#           define HashSet ::std::hash_set
    #       endif
    #   else
    #       define HashMap ::std::hash_map
	#       define HashSet ::std::hash_set
    #   endif


    #define OGRE_DEFINE_STATIC_LOCAL(type, name, arguments) \
        static type& name = *new type arguments


	// Useful threading defines
#include "Threading/OgreThreadDefines.h"

	// Pre-declare classes
    class Animation;
    class AnimationState;
    class AnimationStateSet;
    class AnimationTrack;
    class Archive;
    class ArchiveFactory;
    class ArchiveManager;
    class AutoParamDataSource;
    class AxisAlignedBoxSceneQuery;
    class Bone;
    class Camera;
    class Codec;
    template <typename T> class Controller;
    template <typename T> class ControllerFunction;
    class ControllerManager;
    template <typename T> class ControllerValue;
	class DefaultWorkQueue;
	class DepthBuffer;
    class DynLib;
    class DynLibManager;
    class EdgeData;
    class EdgeListBuilder;
    class Entity;
    class ExternalTextureSourceManager;
    class Factory;
    struct FrameEvent;
    class FrameListener;
    class Frustum;
    class GpuProgram;
    class GpuProgramPtr;
    class GpuProgramManager;
	class GpuProgramUsage;
    class HardwareIndexBuffer;
    class HardwareOcclusionQuery;
    class HardwareVertexBuffer;
	class HardwarePixelBuffer;
    class HardwarePixelBufferSharedPtr;
	class HighLevelGpuProgram;
    class HighLevelGpuProgramPtr;
	class HighLevelGpuProgramManager;
	class HighLevelGpuProgramFactory;
    class IndexData;
	class InstanceBatch;
	class InstanceBatchHW;
	class InstanceBatchHW_VTF;
	class InstanceBatchShader;
	class InstanceBatchVTF;
	class InstanceManager;
	class InstancedEntity;
    class IntersectionSceneQuery;
    class IntersectionSceneQueryListener;
    class Image;
    class KeyFrame;
    class Light;
	class LodStrategy;
	class ManualResourceLoader;
    class Material;
    class MaterialPtr;
    class MaterialManager;
    class MemoryManager;
    class Mesh;
    class MeshPtr;
    class MeshSerializer;
    class MeshSerializerImpl;
    class MeshManager;
    class MovableObject;
    class MovablePlane;
    class Node;
	class NodeAnimationTrack;
	class NodeKeyFrame;
	class NumericAnimationTrack;
	class NumericKeyFrame;
    class Particle;
    class ParticleAffector;
    class ParticleAffectorFactory;
    class ParticleEmitter;
    class ParticleEmitterFactory;
    class ParticleSystem;
    class ParticleSystemManager;
    class ParticleSystemRenderer;
    class ParticleSystemRendererFactory;
    class ParticleVisualData;
    class Pass;
    class PatchMesh;
    class PixelBox;
	class Plugin;
    class Pose;
    class ProgressiveMesh;
    class Profile;
	class Profiler;
    class RaySceneQuery;
    class RaySceneQueryListener;
    class Renderable;
    class RenderPriorityGroup;
    class RenderQueue;
    class RenderQueueGroup;
	class RenderQueueInvocation;
	class RenderQueueInvocationSequence;
    class RenderQueueListener;
	class RenderObjectListener;
    class RenderSystem;
    class RenderSystemCapabilities;
    class RenderSystemCapabilitiesManager;
    class RenderSystemCapabilitiesSerializer;
    class RenderTarget;
    class RenderTargetListener;
    class RenderTexture;
	class MultiRenderTarget;
    class RenderWindow;
    class RenderOperation;
    class Resource;
	class ResourceBackgroundQueue;
	class ResourceGroupManager;
    class ResourceManager;
    class RibbonTrail;
	class Root;
    class SceneManager;
    class SceneManagerEnumerator;
    class SceneNode;
    class SceneQuery;
    class SceneQueryListener;
	class ScriptCompiler;
	class ScriptCompilerManager;
	class ScriptLoader;
    class Serializer;
    class ShadowCaster;
    class ShadowRenderable;
	class ShadowTextureManager;
    class SimpleRenderable;
    class SimpleSpline;
    class Skeleton;
    class SkeletonPtr;
    class SkeletonInstance;
    class SkeletonManager;
    class SphereSceneQuery;
	class StaticGeometry;
	class StreamSerialiser;
    class StringConverter;
    class StringInterface;
    class SubEntity;
    class SubMesh;
	class TagPoint;
    class Technique;
	class TempBlendedBufferInfo;
	class ExternalTextureSource;
    class TextureUnitState;
    class Texture;
    class TexturePtr;
    class TextureManager;
    class TransformKeyFrame;
	class UserObjectBindings;
    class Viewport;
	class VertexAnimationTrack;
    class VertexBufferBinding;
    class VertexData;
    class VertexDeclaration;
	class VertexMorphKeyFrame;
    class WireBoundingBox;
	class WorkQueue;
    class Compositor;
    class CompositorManager;
    class CompositorChain;
    class CompositorInstance;
	class CompositorLogic;
    class CompositionTechnique;
    class CompositionPass;
    class CompositionTargetPass;
	class CustomCompositionPass;
}
//using namespace Ogre;

/* Include all the standard header *after* all the configuration
settings have been made.
*/
#include "OgreStdHeaders.h"


namespace Ogre
{

	typedef std::string _StringBase;

	typedef std::basic_stringstream<char,std::char_traits<char>,std::allocator<char> > _StringStreamBase;


	typedef _StringBase String;
	typedef _StringStreamBase StringStream;
	typedef StringStream stringstream;

}

//for stl container
namespace Ogre
{ 
	template <typename T, typename A = Memory::STLAllocator<T, STL_Alloc_General > > 
	struct deque 
	{ 
	   typedef typename std::deque<T, A> type;    
	   typedef typename std::deque<T, A>::iterator iterator;
	   typedef typename std::deque<T, A>::const_iterator const_iterator;
	}; 

	template <typename T, typename A = Memory::STLAllocator<T, STL_Alloc_General > > 
	struct vector 
	{ 
		typedef typename std::vector<T, A> type;
		typedef typename std::vector<T, A>::iterator iterator;
		typedef typename std::vector<T, A>::const_iterator const_iterator;
	}; 

	template <typename T, typename A = Memory::STLAllocator<T, STL_Alloc_General > > 
	struct list 
	{ 
	   typedef typename std::list<T, A> type;
	   typedef typename std::list<T, A>::iterator iterator;
	   typedef typename std::list<T, A>::const_iterator const_iterator;
	}; 

	template <typename T, typename P = std::less<T>, typename A = Memory::STLAllocator<T, STL_Alloc_General > > 
	struct set 
	{ 
	   typedef typename std::set<T, P, A> type;
	   typedef typename std::set<T, P, A>::iterator iterator;
	   typedef typename std::set<T, P, A>::const_iterator const_iterator;
	}; 

	template <typename K, typename V, typename P = std::less<K>, typename A = Memory::STLAllocator<std::pair<const K, V>, STL_Alloc_General > > 
	struct map 
	{ 
	   typedef typename std::map<K, V, P, A> type;
	   typedef typename std::map<K, V, P, A>::iterator iterator;
	   typedef typename std::map<K, V, P, A>::const_iterator const_iterator;
	}; 

	template <typename K, typename V, typename P = std::less<K>, typename A = Memory::STLAllocator<std::pair<const K, V>, STL_Alloc_General > > 
	struct multimap 
	{ 
		typedef typename std::multimap<K, V, P, A> type;
		typedef typename std::multimap<K, V, P, A>::iterator iterator;
		typedef typename std::multimap<K, V, P, A>::const_iterator const_iterator;
	}; 

} // Ogre


